package cn.tedu.system.service.impl;

import cn.tedu.system.mapper.WarehouseMapper;
import cn.tedu.system.pojo.param.WarehouseAddParam;
import cn.tedu.system.pojo.po.WarehousePO;
import cn.tedu.system.service.WarehousesService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IWarehousesService implements WarehousesService {
    @Autowired
    WarehouseMapper mapper;
    @Override
    public Integer addNew(WarehouseAddParam param) {
        WarehousePO warehousePO=new WarehousePO();
        BeanUtils.copyProperties(param,warehousePO);
        int insert = mapper.insert(warehousePO);
        return insert;
    }
}
